home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / layout / nsIStyleSheetService.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  5KB  |  143 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIStyleSheetService.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIStyleSheetService_h__
  6. #define __gen_nsIStyleSheetService_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIURI; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsIStyleSheetService */
  21. #define NS_ISTYLESHEETSERVICE_IID_STR "41d979dc-ea03-4235-86ff-1e3c090c5630"
  22.  
  23. #define NS_ISTYLESHEETSERVICE_IID \
  24.   {0x41d979dc, 0xea03, 0x4235, \
  25.     { 0x86, 0xff, 0x1e, 0x3c, 0x09, 0x0c, 0x56, 0x30 }}
  26.  
  27. class NS_NO_VTABLE nsIStyleSheetService : public nsISupports {
  28.  public: 
  29.  
  30.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISTYLESHEETSERVICE_IID)
  31.  
  32.   enum { AGENT_SHEET = 0U };
  33.  
  34.   enum { USER_SHEET = 1U };
  35.  
  36.   /**
  37.    * Synchronously loads a style sheet from |sheetURI| and adds it to the list
  38.    * of user or agent style sheets.
  39.    *
  40.    * A user sheet loaded via this API will come before userContent.css and
  41.    * userChrome.css in the cascade (so the rules in it will have lower
  42.    * precedence than rules in those sheets).
  43.    *
  44.    * An agent sheet loaded via this API will come after ua.css in the cascade
  45.    * (so the rules in it will have higher precedence than rules in ua.css).
  46.    *
  47.    * The relative ordering of two user or two agent sheets loaded via
  48.    * this API is undefined.
  49.    */
  50.   /* void loadAndRegisterSheet (in nsIURI sheetURI, in unsigned long type); */
  51.   NS_IMETHOD LoadAndRegisterSheet(nsIURI *sheetURI, PRUint32 type) = 0;
  52.  
  53.   /**
  54.    * Returns true if a style sheet at |sheetURI| has previously been
  55.    * added to the list of style sheets specified by |type|.
  56.    */
  57.   /* boolean sheetRegistered (in nsIURI sheetURI, in unsigned long type); */
  58.   NS_IMETHOD SheetRegistered(nsIURI *sheetURI, PRUint32 type, PRBool *_retval) = 0;
  59.  
  60.   /**
  61.    * Remove the style sheet at |sheetURI| from the list of style
  62.    * sheets specified by |type|.  All documents loaded after
  63.    * this call will no longer use the style sheet.
  64.    */
  65.   /* void unregisterSheet (in nsIURI sheetURI, in unsigned long type); */
  66.   NS_IMETHOD UnregisterSheet(nsIURI *sheetURI, PRUint32 type) = 0;
  67.  
  68. };
  69.  
  70. /* Use this macro when declaring classes that implement this interface. */
  71. #define NS_DECL_NSISTYLESHEETSERVICE \
  72.   NS_IMETHOD LoadAndRegisterSheet(nsIURI *sheetURI, PRUint32 type); \
  73.   NS_IMETHOD SheetRegistered(nsIURI *sheetURI, PRUint32 type, PRBool *_retval); \
  74.   NS_IMETHOD UnregisterSheet(nsIURI *sheetURI, PRUint32 type); 
  75.  
  76. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  77. #define NS_FORWARD_NSISTYLESHEETSERVICE(_to) \
  78.   NS_IMETHOD LoadAndRegisterSheet(nsIURI *sheetURI, PRUint32 type) { return _to LoadAndRegisterSheet(sheetURI, type); } \
  79.   NS_IMETHOD SheetRegistered(nsIURI *sheetURI, PRUint32 type, PRBool *_retval) { return _to SheetRegistered(sheetURI, type, _retval); } \
  80.   NS_IMETHOD UnregisterSheet(nsIURI *sheetURI, PRUint32 type) { return _to UnregisterSheet(sheetURI, type); } 
  81.  
  82. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  83. #define NS_FORWARD_SAFE_NSISTYLESHEETSERVICE(_to) \
  84.   NS_IMETHOD LoadAndRegisterSheet(nsIURI *sheetURI, PRUint32 type) { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadAndRegisterSheet(sheetURI, type); } \
  85.   NS_IMETHOD SheetRegistered(nsIURI *sheetURI, PRUint32 type, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SheetRegistered(sheetURI, type, _retval); } \
  86.   NS_IMETHOD UnregisterSheet(nsIURI *sheetURI, PRUint32 type) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterSheet(sheetURI, type); } 
  87.  
  88. #if 0
  89. /* Use the code below as a template for the implementation class for this interface. */
  90.  
  91. /* Header file */
  92. class nsStyleSheetService : public nsIStyleSheetService
  93. {
  94. public:
  95.   NS_DECL_ISUPPORTS
  96.   NS_DECL_NSISTYLESHEETSERVICE
  97.  
  98.   nsStyleSheetService();
  99.  
  100. private:
  101.   ~nsStyleSheetService();
  102.  
  103. protected:
  104.   /* additional members */
  105. };
  106.  
  107. /* Implementation file */
  108. NS_IMPL_ISUPPORTS1(nsStyleSheetService, nsIStyleSheetService)
  109.  
  110. nsStyleSheetService::nsStyleSheetService()
  111. {
  112.   /* member initializers and constructor code */
  113. }
  114.  
  115. nsStyleSheetService::~nsStyleSheetService()
  116. {
  117.   /* destructor code */
  118. }
  119.  
  120. /* void loadAndRegisterSheet (in nsIURI sheetURI, in unsigned long type); */
  121. NS_IMETHODIMP nsStyleSheetService::LoadAndRegisterSheet(nsIURI *sheetURI, PRUint32 type)
  122. {
  123.     return NS_ERROR_NOT_IMPLEMENTED;
  124. }
  125.  
  126. /* boolean sheetRegistered (in nsIURI sheetURI, in unsigned long type); */
  127. NS_IMETHODIMP nsStyleSheetService::SheetRegistered(nsIURI *sheetURI, PRUint32 type, PRBool *_retval)
  128. {
  129.     return NS_ERROR_NOT_IMPLEMENTED;
  130. }
  131.  
  132. /* void unregisterSheet (in nsIURI sheetURI, in unsigned long type); */
  133. NS_IMETHODIMP nsStyleSheetService::UnregisterSheet(nsIURI *sheetURI, PRUint32 type)
  134. {
  135.     return NS_ERROR_NOT_IMPLEMENTED;
  136. }
  137.  
  138. /* End of implementation class template. */
  139. #endif
  140.  
  141.  
  142. #endif /* __gen_nsIStyleSheetService_h__ */
  143.